/**
 * 下拉设备树- 设置 Selectable
 * @param data
 */
export function processSelectable(data: any, isGroup: boolean = false) {
  data.forEach((item: any, index: number) => {
    item.selectable = !item.isGroup;
    if (isGroup) {
      item.key = `${item.id}@${item.deviceSn}`;
    } else {
      item.key = item.id;
    }
    if (item.children) {
      processSelectable(item.children, isGroup);
    }
  });
}